﻿@{
    ViewData["Title"] = "用户管理";
}

<div class="content-page-header">
    <h2>用户管理</h2>
    <a asp-controller="user" asp-action="addorupdate" class="btn btn-primary">
        <i class="tas tas-plus"></i> 添加用户
    </a>
</div>

<div class="content-card">
    <div class="search-box">
        <select class="btn-outline" id="searchStatus">
            <option value="0" selected>用户状态</option>
            <option value="1">启用</option>
            <option value="2">禁用</option>
        </select>
        <select class="btn-outline" id="searchRole">
            <option value="0" selected>用户角色</option>
            <option value="1">超级管理员</option>
            <option value="2">财务人员</option>
            <option value="3">内容编辑</option>
        </select>
        <div class="search-input">
            <i class="tas tas-search"></i>
            <input type="text" id="searchUserName" placeholder="请输入用户名搜索...">
        </div>
        <div class="search-input">
            <i class="tas tas-search"></i>
            <input type="text" id="searchName" placeholder="请输入用户昵称搜索...">
        </div>
        <button class="btn btn-primary">搜索</button>
    </div>
    <div class="table-container">
        <table class="table table-hover">
            <thead>
                <tr>
                    <th>用户名</th>
                    <th>用户昵称</th>
                    <th>角色</th>
                    <th>状态</th>
                    <th>最后登录</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>admin</td>
                    <td>张管理员</td>
                    <td><span class="badge bg-primary">超级管理员</span></td>
                    <td><span class="badge bg-success">正常</span></td>
                    <td>2023-07-15 14:28</td>
                    <td>
                        <a asp-controller="user" asp-action="detail" asp-route-id="1" class="btn btn-sm btn-outline-success btn-operation" title="查看">
                            <i class="tas tas-view"></i>
                        </a>
                        <a asp-controller="user" asp-action="addorupdate" asp-route-id="1" class="btn btn-sm btn-outline-success btn-operation" title="编辑">
                            <i class="tas tas-edit"></i>
                        </a>
                        <button class="btn btn-sm btn-outline-secondary btn-operation" title="禁用">
                            <i class="tas tas-disabled"></i>
                        </button>
                        <button class="btn btn-sm btn-outline-danger btn-operation" title="删除">
                            <i class="tas tas-delete"></i>
                        </button>
                    </td>
                </tr>
                <tr>
                    <td>editor</td>
                    <td>李编辑</td>
                    <td><span class="badge bg-info">内容编辑</span></td>
                    <td><span class="badge bg-success">正常</span></td>
                    <td>2023-07-16 09:15</td>
                    <td>
                        <a asp-controller="user" asp-action="detail" asp-route-id="1" class="btn btn-sm btn-outline-success btn-operation" title="查看">
                            <i class="tas tas-view"></i>
                        </a>
                        <a asp-controller="user" asp-action="addorupdate" asp-route-id="1" class="btn btn-sm btn-outline-success btn-operation" title="编辑">
                            <i class="tas tas-edit"></i>
                        </a>
                        <button class="btn btn-sm btn-outline-secondary btn-operation" title="禁用">
                            <i class="tas tas-disabled"></i>
                        </button>
                        <button class="btn btn-sm btn-outline-danger btn-operation" title="删除">
                            <i class="tas tas-delete"></i>
                        </button>
                    </td>
                </tr>
                <tr>
                    <td>finance</td>
                    <td>王财务</td>
                    <td><span class="badge bg-warning">财务人员</span></td>
                    <td><span class="badge bg-secondary">禁用</span></td>
                    <td>2023-07-10 16:45</td>
                    <td>
                        <a asp-controller="user" asp-action="detail" asp-route-id="1" class="btn btn-sm btn-outline-success btn-operation" title="查看">
                            <i class="tas tas-view"></i>
                        </a>
                        <a asp-controller="user" asp-action="addorupdate" asp-route-id="1" class="btn btn-sm btn-outline-success btn-operation" title="编辑">
                            <i class="tas tas-edit"></i>
                        </a>
                        <button class="btn btn-sm btn-outline-secondary btn-operation" title="禁用">
                            <i class="tas tas-disabled"></i>
                        </button>
                        <button class="btn btn-sm btn-outline-danger btn-operation" title="删除">
                            <i class="tas tas-delete"></i>
                        </button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>

    <div class="d-flex justify-content-between align-items-center mt-4">
        <div>显示 1 到 3 条，共 3 条记录</div>
        <nav>
            <ul class="pagination mb-0">
                <li class="page-item disabled"><a class="page-link" href="#">上一页</a></li>
                <li class="page-item active"><a class="page-link" href="#">1</a></li>
                <li class="page-item"><a class="page-link" href="#">2</a></li>
                <li class="page-item"><a class="page-link" href="#">3</a></li>
                <li class="page-item"><a class="page-link" href="#">下一页</a></li>
            </ul>
        </nav>
    </div>
</div>